Re: [SQL] Typecasting within sql statement.

Поиск
Список
Период
Сортировка
От lynch@lscorp.com (Richard Lynch)
Тема Re: [SQL] Typecasting within sql statement.
Дата
Msg-id v02140b1ab1c292ce630d@[207.152.64.133]
обсуждение исходный текст
Ответы Re: [SQL] Typecasting within sql statement.  (Colin Dick <cdick@mail.ocis.net>)
Список pgsql-sql
Try something like this:

update myTable set field = 42::text::varchar;

I think the int4 --> text converter is written, and text --> varchar is
written, but int4 --> varchar is not.

Basically, anytime you need to go from one type to another that doesn't
seem to have a converter, look for a more general intermediate type.

At least, that's my understanding after one fight with this. :-)

--
--
-- "TANSTAAFL" Rich lynch@lscorp.com



В списке pgsql-sql по дате отправления:

Предыдущее
От: Colin Dick
Дата:
Сообщение: Typecasting within sql statement.
Следующее
От: Colin Dick
Дата:
Сообщение: Re: [SQL] Typecasting within sql statement.